package com.sansui.blog.controller;

import com.sansui.blog.pojo.SysConfig;
import com.sansui.blog.service.SysInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @name: BlogFriendLinkController
 * @author: Sansui
 * @Software: IDEA
 * @Blog: https://www.cnblogs.com/sansui6/
 * @date: 2022-08-30 21:00
 **/
@RestController
public class BlogFriendLinkController {
    @Autowired
    private SysInfoService sysInfoService;

    @GetMapping("/friendLinks")
    public ModelAndView blogAbout(ModelAndView mv){

        SysConfig sysConfig = sysInfoService.getSysSetting();
        mv.setViewName("theme/"+ sysConfig.getThemeName() +"/friendLinks");
        mv.addObject("webname",sysConfig.getWebname());
        mv.addObject("weburl",sysConfig.getWeburl());
        mv.addObject("webTitle",sysConfig.getWebTitle());
        return mv;
    }
}
